package com.orionelizabeth.Homework8package;

import java.util.ArrayList;
import java.net.URL;

/**
 * test_urlreader class
 * 
 * this class tests the functionality of the urlreader class
 * 
 * @author      Elizabeth Mahon and Orion Taylor (added comments)
 * @course Software Engineering
 * @date 3-10-13
 */

public class test_urlreader
{
	/** function main
	 * 
	 * main tests the functionality of the readURL function of the
	 * urlreader class
	 * 
	 * @param args: command line arguments
	 * @return void: this function returns nothing
	 */
	public static void main(String[] args){
		
		//create a urlread object associated with "http://www.serebii.net"
		urlreader q = new urlreader("http://www.serebii.net");
		
		//output_string is the non html content on this webpage
		String output_string=q.getpage_content();
		
		//so print it out to the terminal
		System.out.println(output_string+"\n");
		
		
		//URL_list is a list of all the URL's on this webpage
		ArrayList<URL> URL_list=q.getURL_list();
		
		//iterate through it and print out each one
		for(URL e_string:URL_list){
			System.out.println(e_string);
		}
		
	}
}
